package com.aistar.service.myfoot.impl;

import com.aistar.mapper.AnswerMapper;
import com.aistar.pojo.Answer;
import com.aistar.pojo.AnswerExample;
import com.aistar.service.myfoot.MyAnswerService;
//import com.sun.tools.javac.util.List;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author shkstart
 * @date 2019/10/13 - 21:45
 */
@Service
public class MyAnswerServiceImpl implements MyAnswerService {
    @Autowired
    private AnswerMapper answerMapper;
    @Override
    public List<Answer> selectAnsByUserId(int userId) {
        AnswerExample answerExample = new AnswerExample();
        AnswerExample.Criteria criteria = answerExample.createCriteria();
        criteria.andAnsUserIdEqualTo(userId);
        return answerMapper.selectByExampleWithBLOBs(answerExample);
    }
}
